



# manager = Manager(app)
# Migrate(app,db)
# manager.add_command('db',MigrateCommand)
import logging
from info import create_app,db,models
from flask import current_app
from flask_migrate import Migrate,MigrateCommand
from flask_script import Manager




# 调用方法,获取app对象,app对象已有配置信息
app = create_app('develop')

manager = Manager(app)
Migrate(app,db)
manager.add_command('db',MigrateCommand)


@app.route('/')
def hello_world():

    logging.debug('调试信息')
    logging.info('详细信息')
    logging.warning('警告信息')
    logging.error('错误信息')


    return 'hello world!'


if __name__ == '__main__':

    manager.run()